using System;
using System.Text;
using System.Collections.Generic;
using System.Xml;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using OR.Reuse.Persistence;
using System.IO;

namespace OR.Lazarus.Library.Tests.CPP
{
	/// <summary>
	/// Summary description for CPPTests
	/// </summary>
    [Ignore()]
	public class CPPTestBase< CONTEXT >
		where CONTEXT : EntityBase, new()
	{
		public const string ErrorInvalidCount = "Count for {0} failed:  Expected {1}, found {2}.";
//		public const string ErrorUnexpectedNull = "

		protected CONTEXT mDetail;

		protected virtual void InitializeDetail( string pFilename )
		{
			mDetail = new CONTEXT();

			mDetail.LoadXml( Path.Combine( Properties.Settings.Default.SourcePath, pFilename ) );
		}

		protected virtual void InitializePersistence()
		{
			NameTable v_oNames = new NameTable();

			PersistenceConfig.Namespaces = new XmlNamespaceManager( v_oNames );
			PersistenceConfig.Namespaces.AddNamespace( "lzr", "http://schemas.icitadel.com/Lazarus/CPP/Rules.xsd" );
			PersistenceConfig.Namespaces.AddNamespace( "lzt", "http://schemas.icitadel.com/Lazarus/CPP/Types.xsd" );
			PersistenceConfig.Namespaces.AddNamespace( "lzn", "http://schemas.icitadel.com/Lazarus/CPP/Notation.xsd" );
		}

		public CPPTestBase()
		{
			//
			// TODO: Add constructor logic here
			//
		}
	}
}
